import reducer from './reducer'

const themeReducer = (state, action) => {
    if (!state) return {
     ...reducer.state
    }
    let fn =reducer.action[action.type];
    debugger
    if(fn){
      fn(state,action)
     
      return {
          ...state
      }
    }
    else{
      return state;
    }

    // switch (action.type) {
    //   case 'CHANGE_COLOR':
    //     return { ...state, themeColor: action.themeColor }
    //   default:
    //     return state
    // }
  }
  export default themeReducer